var loginVue = new Vue({
	el: "body",
	data: {
		userName: "",
		userPwd: "",
	},
	created: function() {
		init();
	},
	methods: {
		login: function() {
			if(this.userName.trim().length == 0 || this.userPwd.trim().length == 0) {} else {
				AV.User.logIn(this.userName, this.userPwd).then(function(loginedUser) {
					currentUser = AV.User.current();
					var href = getUrlItem(location.search, "RetUrl");
					location.href = href ? href : "index.html";
				}, function(error) {
					alert(JSON.stringify(error));
				});
			}
		},
		resetPwd:function  () {
			location.href="./resetPwd.html"
		},
		myRegister:function  () {
			location.href="./register.html"
		},
		myReturn:function  () {
			location.href="./index.html"
		}
		
	}
})